<?php

class Service
{
    public function __construct()
    {}
    
    function sayHello($who, $when)
    {
        return "Hello $who, Good $when";
    }

    function add($a, $b)
    {
        return $a + $b;
    }

    function sub($a, $b)
    {
        return $a - $b;
    }
}



class Service_Presenter extends Presenter
{
    public function __construct()
    {
        parent::__construct();
        
        $server = $this->engine->load('RestServer');
        $server->setClass('Service');

        $server->handle();
        
        /*
        $server = new Zend_XmlRpc_Server();
        $server->setClass('Service', 'myservice');
        echo $server->handle();   
        */
    }
}

?>